<template>
	<view style="height: 50px; ,width: 50px">
		<web-view :src="!fileUrl ? '' : fileUrl" :webview-styles="webviewStyles"></web-view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			fileUrl: '',
			webviewStyles: {
				progress: {
					color: '#FF3333'
				}
			}
		};
	},
	onLoad(option) {
		const IP = this.$store.state.IP;
		console.log('IP', IP);
		this.fileUrl = IP + option.file;
		console.log(this.fileUrl);
		// this.fileUrl = `https://docs.google.com/viewer?url=${encodeURIComponent(
		// 	'http://erp.qhenv.com:9993/Upload/Tables/q_stock_in/202501/72bf062a-bcd3-4188-aa46-9ae27307ad60.pdf' // 替换为你的文件URL
		// )}&embedded=true`;
	},
	methods: {}
};
</script>

<style lang="scss" scoped></style>
